/*
 * =====================================================================================
 *
 *       Filename:  main.cc
 *
 *    Description:
 *
 *        Version:  1.0
 *        Created:  2022年01月20日 17时24分45秒
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  first_name last_name (fl), fl@my-company.com
 *        Company:  my-company
 *
 * =====================================================================================
 */

#include <iostream>

using std::cout;
using std::endl;
using std::string;

struct Mem {
    Mem() {
        cout << "Mem default, num: " << num << endl;
    } 
    
    Mem(int i): num(i) {
        cout << "Mem, num: " << num << endl;
    }

    int num = 2;
};

class Group {
  public:
    Group() {
        cout << "Group, default val: " << val << endl;
    } 
    
    Group(int i): val(i) {
        cout << "Group, val: " << val << endl;
    }

    void NumOfA() {
        cout << "NumOfA: " << a.num << endl;
    }

    void NumOfB() {
        cout << "NumOfB: " << b.num << endl;
    }

  private:
    char val {
        'g'};

    Mem a;
    Mem b {
        19};

};

int main() {
    Mem mem;
    Group group;
    group.NumOfA();
    group.NumOfB();
    Group group2(2);
    group2.NumOfA();
    group2.NumOfB();
    return 0;
}
